home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / ACCOUTIL / LTSTIPS3.LZH / LOTUSTIP < prev    next >
Text File  |  1985-11-28  |  55KB  |  1,007 lines

  1.                         System Disk Trick
  2.        (PC Magazine Vol 3 No 17 Sept 4, 1984 User-to-User)
  3.  
  4.      For users of Release 1A of 123 on hard disks who do not like to
  5. get out their system disk each time they boot 123, from the DOS prompt
  6. (or in an AUTOEXEC.BAT file) simply type 123 and hit Enter.  This does
  7. not work if you load the Lotus Access System before loading 123.  When
  8. the 123 copyright notice appears, place a blank unformatted disk in
  9. drive A: and press any key.  The blank 123 spreadsheet appears and
  10. away you go.
  11.  
  12. -----------------------------------------------------------------
  13.                   Transferring Worksheet Ranges
  14.               (PC World April 1984 The Help Screen)
  15.  
  16.      Assume you have two worksheet files called ONE and TWO that are
  17. too large to combine in a single file.  Calculations in worksheet ONE
  18. produce results in the range V102..V152.  The method to automatically
  19. enter the results in worksheet TWO (assume cells C22..C72) and
  20. recalculate worksheet TWO is this.
  21.      First, load worksheet ONE and move the cell pointer to cell V102).
  22. Next, use the command /Range Name Create, enter a name such as TRANSFER
  23. LIST, and specify the range V102..V152.  Then save worksheet ONE.
  24.      Now load worksheet TWO, move the cell pointer to C22, and give the
  25. command /File Combine Copy NamedRange TRANSFER LIST.  The entries in
  26. cells V102..V152 of worksheet ONE will be copied into cells C22..C72 of
  27. worksheet TWO.  If formula recalculatino for worksheet TWO has been set
  28. to manual (/Worksheet Global Recalculation Manual), press the F9 key to
  29. recalculate worksheet TWO's formulas.
  30.      This procedure can be abbreviated to two keystrokes by using 123's
  31. macros.  Load worksheet ONE, move the cell pointer to an empty area,
  32. and enter the following macro:
  33.  
  34. {goto}V102~
  35. '/rncTRANSFER LIST~
  36. V102..V152~
  37. '/fsONE~
  38. r
  39. '/frTWO~
  40.  
  41.      To name the macro, move the cell pointer to the cell that contains
  42. the first macro command.  Use the letter T for transfer.  Select /Range
  43. Name Create, type \T and press Enter twice.  Save this worksheet and
  44. its newly created macro.  You can invoke this macro at any time by
  45. pressing <Alt>-T.
  46.      The remainder of the routine must be in worksheet TWO.  For the
  47. sake of convenience, refer to it by the same <Alt> key combination as
  48. the macro in worksheet ONE. Load worksheet TWO, move the cell pointer
  49. to an empty area and enter the macro:
  50.  
  51. {goto}C22~
  52. 'fccnTRANSFER LIST~
  53. ONE~
  54. {calc}
  55.  
  56.      Name this macro (/Range Name Create), type \T, press Enter twice,
  57. and save worksheet TWO.  Because the macros in both worksheets share
  58. the same name, whenever worksheet ONE is loaded and 123 is in the Ready
  59. mode, you can transfer the list of values from cells V102..V152 in
  60. worksheet ONE to cells C22..C72 of worksheet TWO simply by pressing
  61. <Alt>-T twice.
  62.  
  63. CORRECTION (from PC World July 1985 The Help Screen):
  64.      If the range to be copied contains worksheet formulas, these 
  65. formulas -- rather than their current values -- are transferred to the
  66. second worksheet.  This does not solve the problem of transferring
  67. values.
  68.      The answer, of course, is to use the /File Combine Add command
  69. which adds the value of the cells from the first worksheet to whatever
  70. is in the target cells in the second worksheet.  It's also a good idea
  71. to preface this command with a /Range Erase just to make sure that the
  72. cells in the second worksheet are empty.  To amend the procedure
  73. described above, edit the macro for worksheet TWO to read:
  74.  
  75. {goto}C22~
  76. '/reC22..C72~
  77. '/fcanTRANSFER LIST~
  78. ONE~
  79. {calc}
  80.  
  81. -----------------------------------------------------------------
  82.                   Leaving a Hole for a Variable
  83.    (PC Magazine Vol 4 No 13 June 25, 1985 Spreadsheet Clinic)
  84.  
  85.      It's useful to be able to put variables into a macro.  The trick
  86. is to put a "hole" in the macro which is filled before the macro
  87. executes.
  88.      Figure 1 involves two simple macros.  You could use it as part of
  89. a procedure to input monthly data according to a standard format and
  90. save the data with the name of the month as the filename.  The first
  91. macro prompts for the name of the month and stores the name in cell C1.
  92. After you have entered all the data for that month, you invoke the
  93. second macro, which copies the name of the month into the "hole" in
  94. cell A3.  The macro then does a file save, using the name of the month
  95. as the filename.
  96.      The key to using variables in macros is to understand that single
  97. commands can be spread over several cells.  The file save command that
  98. starts in cell A2 doesn't end until cell A4.  This is what lets you put
  99. a variable in cell A3.
  100.      Figure 2 is a more complex example, which you might use to adjust
  101. all the numbers in a column of figures by multiplying them by a
  102. constant.  The macro prompts for the constant and the address of the
  103. column of figures and away it goes.  The range name routine (cells AA6
  104. through AA8) that stops the macro at the last number in the column is
  105. from LeBlond and Cobb's book, Using 1-2-3.
  106.      Editor's Note:  An example in User-to-User Vol 3 No 18 used this
  107. technique but didn't elaborate on the principle.  The macro in Figure 2
  108. could be made even more flexible if there were a third prompt that
  109. supplied the operation to be performed on the column of figures (in this
  110. case the * in cell AA9).  Any of the arithmetic operators would work.
  111. There's nothing to stop you from slinging as many variables as you like
  112. into your macros.
  113. - - - - -
  114. Figure 1: Simple Macros -- this procedure creates a slot that can be
  115. filled with variable information
  116.  
  117. First Macro
  118.  
  119.           /xlWhat is the month of this budget? : ~C1~
  120.  
  121. Second Macro
  122.  
  123. Cell A1   /cc1~A3~
  124. Cell A2   /fs
  125. Cell A3
  126. Cell A4
  127. - - - - -
  128. Figure 2: Complex Macro -- This macro carries out an arithmetic
  129. function with the constant and cell addresses supplied by the user
  130.  
  131. Cell AA1       /xlWhat is the adjustment? : ~AA10~
  132. Cell AA2       /xlWhat is the column? : ~AA4~
  133. Cell AA3       {goto}
  134. Cell AA4
  135. Cell AA5       ~
  136. Cell AA6       /RNCTEMP~~
  137. Cell AA7       /XITEMP=0~/RNDTEMP~/XGAA15~
  138. Cell AA8       /RNDTEMP~~
  139. Cell AA9       {edit}*
  140. Cell AA10 
  141. Cell AA11      ~
  142. Cell AA12      {edit}{calc}~
  143. Cell AA13      {down}
  144. Cell AA14      /xgAA6~
  145.  
  146. -----------------------------------------------------------------
  147.                    Don't Justify Named Ranges
  148.     (PC Magazine Vol 4 No 14 July 9, 1985 Spreadsheet Clinic)
  149.  
  150.      Don't use range names when you justify labels.  The command 
  151. "/Range Justify named-range <Enter>" will wipe out your range name.
  152.      Editor's Note:  It won't really wipe out your range name; 123 
  153. remembers it.  If you try a /Range Name Delete command, 123 will list
  154. the range name on the command line.  However, the range is no longer
  155. valid, and when you try to do something with it (copy, move, etc.),
  156. 123 will tell you that it's an illegal range.  This is a case of a
  157. perfectly legal range being made an outlaw by having its contents
  158. rearranged.  The same thing will happen if you use the normal cell
  159. address technique to justivy labels that happen to contain a named 
  160. range.  123 will still remember the range but will tell you it's
  161. illegal any time you try to do something with it.  Justification and
  162. named ranges don't mix.
  163.  
  164. -----------------------------------------------------------------
  165.                       Linked 123 Worksheets
  166.                (PC World July 1985 Star-Dot-Star)
  167.  
  168.      It's not uncommon to have a series of 123 worksheets that must be
  169. subjected to an identical group of procedures.  This typically involves
  170. loading a template, "combining-in" a file, performing various
  171. operations, and printing the result.  In the past we used a brute-force
  172. approach.  Today all our files contain a small macro named \0 at cell
  173. B1 (any cell will do).  The macro consists of {GoTo}B2~/FCCEzero~, and
  174. cell B2 is blank. An empty worksheet named Zero is kept in each
  175. subdirectory.
  176.      The effect of the macro is to combine the worksheet Zero below the
  177. autoexecuting macro every time the worksheet is loaded.  Usually Zero
  178. is empty and the macro stops.  To perform a series of operations on a
  179. group of worksheets, just put the appropriate macro into cell A1 of
  180. Zero to initiate the sequence for each worksheet.  This allows a
  181. worksheet to pass macro keystrokes to another file, a feature not
  182. otherwise available in 123.  In addition, the File Extract command can
  183. put keystrokes into Zero that cause it to retrieve the next worksheet
  184. in sequence.
  185.  
  186. -----------------------------------------------------------------
  187.                       Combining Worksheets
  188.     (PC Magazine Vol 4 No 17 Aug 20, 1985 Spreadsheet Clinic)
  189.  
  190.      It's often necessary to take selected data from a worksheet on
  191. disk (call it DISK.WKS) and read it into the worksheet you are
  192. currently working on (SCREEN.WKS).  If, when you last saved DISK.WKS,
  193. you knew exactly what data you would later need in SCREEN.WKS, you
  194. could have given that data a range name.  Then you could use the /File
  195. Combine Copy Named-range command to read the data you need from
  196. DISK.WKS into SCREEN.WKS.
  197.      However, you may need data from DISK.WKS but haven't given that
  198. data a range name.  In order to get that data, you have to 1) save
  199. SCREEN.WKS, 2) retrieve DISK.WKS and find the data, 3) give the data a
  200. range name, 4) save DISK.WKS, 5) retrieve SCREEN.WKS, and 6) read the
  201. necessary data from DISK.WKS into SCREEN.WKS with /File Combine Copy
  202. Named-range.
  203.      A quicker way, though the first two steps are the same, is:
  204. 1) save SCREEN.WKS, 2) retrieve DISK.WKS and find the data, then 3) use
  205. /File Xtract Values to put this data in a temporary file, say,
  206. TEMP.WKS, and 5) read TEMP.WKS into SCREEN.WKS with /File Combine Copy
  207. Entire-file.  This saves time for two reasons.  /File Combine will
  208. retrieve a named range from a large file.  Also, since you are not
  209. giving DISK.WKS a new range name, you don't have to save it back to
  210. disk.
  211.      Editor's Note:  This method is quicker.  However, you give up one
  212. thing in return for speed: you haven't got a named range in DISK.WKS if
  213. you ever need the same data again.  You should give your data range
  214. names to begin with so you never have to dump/reload the current file.
  215.  
  216. -----------------------------------------------------------------
  217.            Shrinking a Spreadsheet for Maximum Memory
  218.     (PC Magazine Vol 4 No 16 Aug 6, 1985 Spreadsheet Clinic)
  219.  
  220.      If you use large 123 models, your computer may run out of memory.
  221. One way to get memory back is to get rid of unnecessary cells.  If you
  222. decide you don't need cells beyond a certain point in the worksheet, go
  223. to the cell just below the last useful cell and hit /Range Erase (End)
  224. (Home) Enter.  This will erase everything between the last useful cell
  225. and the last cell in the worksheet.  However, you won't get all your
  226. memory back just because you erased the cells.  If you hit (End) (Home)
  227. again, you will find that the cursor ends up at the cell that was last
  228. in the spreadsheet before you used /Range Erase.  In other words, 123 
  229. thinks the spreadsheet is still the same size as before, even though
  230. the cells are blank.  It will release the memory it was using to store
  231. the cell contents but will still require some memory just to keep track
  232. of the blank cells it thinks are still part of the worksheet.
  233.      To get all your memory back do a /File Save and then a /File 
  234. Retrieve.  By reading the worksheet back into memory, 123 figures out
  235. that the blank cells really aren't part of the spreadsheet and thus
  236. releases the memory it was using to keep track of them.
  237.      Even this technique won't work at times. Even after the /File Save
  238. and /File Retrieve sequence, the (End) (Home) command still may take
  239. you to a blank cell (the last one before your /Range Erase) at the
  240. bottom of the worksheet.  The reason is that some of the now-blank
  241. cells were either unprotected or formatted with the /Range Format
  242. command.  In either case, 123 treats them as if they held data,
  243. refusing to give them up, and so wastes memory on them.
  244.      You can solve this problem by using /Range Protect (End) (Home)
  245. and /Range Format Reset (End) (Home).  These operations disable the
  246. special status of these cells and allow 123 to ignore them.  Now,
  247. after you have saved and retrieved the worksheet, you will find that
  248. you have gotten all your memory back.
  249.  
  250. -----------------------------------------------------------------
  251.              Making a Table of 1-2-3 Range Addresses
  252.     (PC Magazine Vol 4 No 16 Aug 6, 1985 Spreadsheet Clinic)
  253.  
  254.      Symphony has a Range Name Table command that lists the cells 
  255. represented by range names.  123 does not have this feature, but a 
  256. short macro (Figure 1) will produce the same table that Symphony 
  257. does and will sort the list of range names alphabetically.
  258.      To use the macro, first make a list of range names in a column in
  259. your worksheet, as in the "before" part of Figure 2.  Make sure that
  260. there is an empty cell above and below the list and that there are no
  261. empty cells within the list.  When you are writing the macro, remember
  262. to give the range name SORT to the cell where the sort routine begins.
  263. To fill in the table with the cells in each range, put the cursor on
  264. the first range name of the list and run the macro.  This macro is a
  265. big help in keeping track of ranges in complex worksheets.  Whenever
  266. you create a new range, add it to the list of names and rerun the
  267. macro.  This keeps the documentation current and accurate.
  268. - - - - -
  269. Figure 1: Macro to create a table of range names, and sort them.
  270.  
  271. \T     /c~{right}~                   'Copy this label name to right
  272.        /rncCC~{bs}.{right}~          'Name these 2 cells as Current
  273.                                       Cells (CC)        
  274.        /xi@count(cc)=0~/xgSORT~      'If blank, go to SORT step
  275.        {right}{edit}                 'Edit duplicate label name
  276.        {home}{del}@sum({end})~       'Convert to @sum(x) formula
  277.        {edit}{bs}{home}              'Edit again
  278.        {del}{del}{del}{del}{del}'~   'Convert formula back to label
  279.        {left}{down}                  'Go to next label name in list
  280.        /xg\T~                        'Loop back to process next 
  281.                                       address label
  282. SORT:  {up}{end}{up}                 'Position cursor for sort
  283.        /dsr                          'Reset sort parameters
  284.        d{bs}.{end}{down}{right}~     'Define data range
  285.        p~a~g                         'Define sort key ...go
  286. - - - - -
  287. Figure 2: Printout of a list of range names in a spreadsheet before
  288. running the macro above and after, including a display of the cell
  289. locations.
  290.  
  291. ===== BEFORE =====            ===== AFTER =====
  292.  
  293. RANGE        CELLS            RANGE       CELLS
  294. NAME                          NAME
  295. LIST                          LIST
  296. =====        =====            =====       =====
  297.  
  298. SUM                           A           A2..A16
  299. A                             B           C2..G2
  300. C                             C           D5..F13
  301. B                             SUM         C16
  302.  
  303. -----------------------------------------------------------------
  304.                    Building a Range Name Table
  305.    (PC Magazine Vol 4 No 19 Sept 17, 1985 Spreadsheet Clinic)
  306.  
  307.      If you work with large spreadsheets with many range names, it can
  308. be hard to keep track of them.  By hitting F5 and then F3, the range
  309. names will appear in the control panel, but it can be cumbersome to
  310. scroll through them all, looking for the one you want.  A macro will
  311. will create range names and build a table of names with a description
  312. of the contents of each range.
  313.      When you set up the heading for the table (lines 3 and 4), it's
  314. a good idea to make column D 16 characters wide.  That lets you enter
  315. range names as long as 123's maximum of 15 characters, with one extra
  316. character for separation.  The macro requires 3 specified range names.
  317. Cell C3 must be called Range Names, cell E18 must be Range-Name:, and
  318. E21 must be Scratch.
  319.      You run the macro whenever you are about to name a range.  Put the
  320. cursor on the top left cell of the range and invoke the macro with
  321. Alt-T.  The macro will prompt you you for the range name and a brief
  322. description of its contents.  It then creates the range name you
  323. entered, and ends by letting you define the range by "pointing" with
  324. the cursor and hitting Enter.  Lines 5 and 6 are samples of the kind
  325. of information you might put into the table.  In a real worksheet you
  326. would locate the table so as to leave many lines free for adding new
  327. ranges.  The macro:
  328.  
  329.       C      D                    E
  330.  3   Range  Names        Description
  331.  4   """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  332.  5     1   SUM           Sum of monthly sales figures.
  333.  6     2   NAMES         Names of salesmen.
  334.  7
  335.  8
  336.  9
  337. 10
  338. 11   \T           /xlEnter Range Name:  ~RangeName:~
  339. 12                /xlDescription: ~Scratch~
  340. 13                /rncHere~~
  341. 14                {Goto}Range Names~{End}{down}{down}{1+{up}~{edit}{calc}~
  342. 15                {right}/CRangeName:~~{right}{/cScratch~~
  343. 16                {Goto}Here~/rndHere~
  344. 17                /rnc
  345. 18   RangeName:
  346. 19                ~
  347. 20
  348. 21   Scratch
  349.  
  350.      Editor's Note:  In PC Mag Vol 4 No 16 "Making a Table of 1-2-3
  351. Range Addresses" (above), I included a different macro that builds a
  352. table of named ranges.  It is based on a routine that prints out the
  353. cell addresses of named ranges.  If this macro incorporated this
  354. routine, the table would include a column giving the cell addresses
  355. of each named range as well as a description line.
  356.  
  357. -----------------------------------------------------------------
  358.            Macro That Names Ranges of Unknown Lengths
  359.     (PC Magazine Vol 4 No 23 Nov 12, 1985 Spreadsheet Clinic)
  360.  
  361.      You may sometimes find you have to write a 123 macro that assigns
  362. a name to a range of cells.  For example, you may need to name the
  363. results of a data query so that you can sort or copy the output.
  364.      Most of the time this is easy:  Send the cursor to the beginning
  365. of the range and use {End}{Down}{End}{Right} to find the limits of the
  366. range.  You can run into problems, though, if the macro tries to name
  367. a range that is only one row deep.  In this case, if you go to the
  368. first (and only) row in the range and use {End}{Down}, you could send
  369. the cursor to the far depts of the worksheet.
  370.      The macro below solves this problem.  You can use it to name a
  371. range of only one row.  For the trick to work, though, you have to
  372. start naming the range one cell above the acual area you are interested
  373. in.  In this example, start the macro from cell C4, even though the
  374. data query output you want to name begins in cell C5.  What's in row
  375. 4 doesn't matter; it just provides space above the cells you want to
  376. name.
  377.      The macro starts off normally.  It sends the cursor to C4 and
  378. uses END and the arrow keys to define the range.  If the macro stopped
  379. there, though, the range would include the unnecessary row above the
  380. range.  Cell D14 in the macro gets rid of this by using a technique to
  381. move the "free cell."  While you are "pointing" to define a range, each
  382. time you hit the period key, the free cell moves clockwise to another
  383. corner of the range.  The two periods in cell D14 move the free cell
  384. from the lower right-hand corner to the top of the range.  The {Down}
  385. command then takes row 4 out of the range, and the final carriage
  386. return defines the range.
  387.      Although this technique works with one-row ranges, you can still
  388. run into problems if there are no records that match your data query
  389. and the output area is blank.  Your macro may need to test the output
  390. area to make sure it contains data before it calls this routine.
  391.      Editor's Note:  As long as you are working with data query output
  392. that is at least several columns wide, you won't have to worry about
  393. {End}{Right} taking the cursor for a joy ride.  But what happens if
  394. your target range is just one cell?  The macro can be modified to deal
  395. with that problem, too.  Just make the starting cell one column to the
  396. left as well as one row above the raget range and change cell D14 to
  397. read: ..{Down}{Right}~
  398.  
  399.               C                    D                E          F
  400.  4           Name               Address           City       State
  401.  5   Smith, Francis J.   127 Canton Avenue     Providence     RI
  402.  6
  403.  7
  404.  8
  405.  9   \N                  {goto}C4~         Goto row above target area
  406. 10                       /rndOUTPUT~       Clear previous name use
  407. 11                       /rncOUTPUT~       Create range name OUTPUT
  408. 12                       {end}{down}       Find lower limit
  409. 13                       {end}{right}      Find rightmost limit
  410. 14                       ..{down}~         Move free cell clockwise to
  411. 15                                           top of range and move it
  412. 16                                           down one row to finish
  413. 17                                           defining the area to be
  414. 18                                           named
  415.  
  416. -----------------------------------------------------------------
  417.                  Hiding Notes Within a Worksheet
  418.     (PC Magazine Vol 4 No 16 Aug 6, 1985 Spreadsheet Clinic)
  419.  
  420.      When building 123 or Symphony models to be used by other people,
  421. make a point of annotating them.  Describe all assumptions and, when
  422. appropriate, the rationale behind an assumption.  However, if the
  423. annotations are in the worksheet itself, the result can be visually
  424. confusing, and if they are on paper, it may be awkward for the user
  425. to refer to them while he is running the model.  To "hide" annotations
  426. within a worksheet, create a new column, only one character wide, to
  427. the left of the values you want to annotate.  If, when you type notes
  428. into that column, you begin with a space or two, the column will
  429. normally appear to be empty.  When the user needs to read your notes,
  430. however, he can move the cursor to that column, and a line of text will
  431. appear in the control panel.  If he wants to read all the text at once,
  432. he can temporarily widen the notes column.
  433.      Editor's Note:  This is the best way to annotate a worksheet, 
  434. though you may need to watch for a few things.  For example, when 
  435. you're typing in a notation on the second line of the control panel,
  436. you can use up to 80 characters.  But once that note is entered, and a
  437. user wants to read the contents by putting the cursor on that cell, the
  438. note will appear in the top line of the control panel, which displays
  439. only 67 characters.  Hitting the F2 key will bring back all 80
  440. characters, but not all spreadsheet users will think of that.  Another
  441. point to remember is that a long annotation will show up in any blank
  442. cells to the right even if the adjacent cell to the right has something
  443. in it.  Let's say column A contains your notes, columns B and C contain
  444. values, and column D is blank for aesthetic reasons.  Your note text
  445. won't appear in B or C but, if it's long enough, it will show through
  446. in D, which is blank.
  447.  
  448. -----------------------------------------------------------------
  449.                     Hiding Spreadsheet Notes
  450.     (PC Magazine Vol 4 No 23 Nov 12, 1985 Spreadsheet Clinic)
  451.  
  452.      In your response to "Hiding Notes Within a Spreadsheet" (Vol 4
  453. No 16) (above), you pointed out that if the columns to the right of the
  454. note are blank, the note text will spill into them.  You can avoid this
  455. by starting notes with \ and as many spaces as there are characters in
  456. the notes column.  The entire spreadsheet may be blank, but you still
  457. won't see the notes until you move the cursor to them.
  458.  
  459. -----------------------------------------------------------------
  460.                            Cell Mating
  461.     (PC Magazine Vol 4 No 18 Sept 3, 1985 Spreadsheet Clinic)
  462.  
  463.      This macro combines the contents of two different 123 worksheet
  464. cells and writes them to a third cell.  In the example below, the macro
  465. (lines 3 to 33) combines the book titles in cells C37..C39 with the
  466. authors in cells D37..D39, puts the word "by" between the two, and
  467. writes the results to cells E37..E39.  The macro works on the principle
  468. of filling in "holes" in the macro (cells D11 and D13) with variables,
  469. and operating on those variables when the macro processor gets to those
  470. cells.  The macro uses several predefined range names, but in every
  471. case the range is the cell to the right of the range name in cells
  472. C3..C33.  The macro can also be used to combine strings of any kind.
  473.      Editor's Note:  There is a way both to simplify the macro and to
  474. eliminate the awkward series of {del}s (lines 14 and 15) in the process.
  475. All you have to do to accomplish this is to remove lines 9, 14, 15, 32,
  476. and 33, and to replace line 20 with /reEDIT~.  Then give a blank cell
  477. the range name EDIT, so as to put that part of the "work area" outside
  478. the macro.  The routine will then run a little more quickly and will
  479. take up fewer lines.
  480.            C               D               E                    F
  481.  3  \C        {goto}c37~                         Cursor to first title field
  482.  4  CONTINUE  /rncTITLE~~                        Name the field TITLE
  483.  5            /c~TITLE_X~                        Copy title to work area
  484.  6            {right}                            Cursor to author field
  485.  7            /c~AUTHOR_X~                       Copy author to work area
  486.  8            {goto}EDIT~                        Cursor to work area
  487.  9  EDIT      {edit}{home}                       Edit work area
  488. 10            '                                  Label prefix
  489. 11  TITLE_X                                      Read title
  490. 12             by                                Insert " by "
  491. 13  AUTHOR_X                                     Read author
  492. 14            {del}{del}{del}{del}{del}{del}     Delete "'{edit}{home} from
  493. 15            {del}{del}{del}{del}{del}{del}{del}  the work area
  494. 16            ~                                  End edit
  495. 17            {goto}TITLE~                       Cursor to TITLE
  496. 18            {right}{right}                     Cursor to Title/Author field
  497. 19            /cEDIT~~                           Copy work area to Title/Author
  498. 20            /cEDIT_COM~EDIT~                   Replace edit command
  499. 21            {goto}TITLE~                       Cursor to title field
  500. 22            /rncEND_CHECK~{down}~              Create range to check for end
  501. 23            /xi(@count(END_CHECK)=1)~/xgEND~   If next title field empty, END
  502. 24            /rndEND_CHECK~                     Delete range for end check
  503. 25            /rndTITLE~                         Delete old TITLE
  504. 26            {down}                             Cursor to next title field
  505. 27            /xgCONTINUE~                       Loop back to beginning
  506. 28
  507. 29  END       /rndEND_CHECK~                     Delete range for end check
  508. 30            /rndTITLE~                         Delete old TITLE
  509. 31            /xq                                Quit
  510. 32
  511. 33  EDIT_COM  {edit}{home}                       Edit command replacement
  512. 34
  513. 35
  514. 36  TITLE          AUTHOR           TITLE/AUTHOR
  515. 37  Rob Roy        Walter Scott     Rob Roy by Walter Scott
  516. 38  Burmese Days   George Orwell    Burmese Days by George Orwell
  517. 39  Main Street    Sinclair Lewis   Main Streen by Sinclair Lewis
  518. 40  Here at PC     Ruth Saperstein  Here at PC by Ruth Saperstein 
  519. 41  Digging Eqypt  Rosetta Stone    Digging Egypt by Rosetta Stone
  520. 42  Moby Dick      H. Melville      Moby Dick by H. Melville
  521.  
  522. -----------------------------------------------------------------
  523.                   1-2-3 as a Diskette Librarian
  524.     (PC Magazine Vol 4 No 19 Oct 1, 1985 Spreadsheet Clinic)
  525.  
  526.      With very little work, you can turn 123 into a diskette librarian
  527. that's better than several special-purpose programs, including IBM's
  528. diskette librarian.  All you need is to create ASCII files of your disk
  529. directories and import them into a 123 spreadsheet.  To create an ASCII
  530. directory file, just redirect the output of the DOS DIR command to a
  531. file on disk with the following command:  DIR d:>d:filename.PRN.  Don't
  532. forget to give the file a PRN extension, because 123 won't import files
  533. with any other extension.
  534.      Import the disk directory file with the /File Import Text command.
  535. You will get an error message saying "Part of file is missing" when you
  536. hit Enter.  Ignore that message.  Just hit Enter again and the disk
  537. directory file will appear in your worksheet just below the cursor.
  538. (You get the error message because the DOS pipe used to create the
  539. directory file doesn't put a ^Z at the end.)  Use the same import
  540. command to read as many diskette directories as you like into the same
  541. worksheet.  Identify the contents of each diskette with a DOS volume
  542. label, or give each directory in the worksheet a name, and write that
  543. name on the diskette's paper label.  You will have plenty of room to
  544. identify each disk file within the 123 worksheet because you can put up
  545. to 240 characters in a single cell.  (If you plan to print out your
  546. disk library, you had better limit your comments to your printer's
  547. maximum line length.)  If you keep your library up to date, you'll
  548. never have to worry again about where you put a file.
  549.      Editor's Note:  An added bonus of this technique is that you can
  550. use 123's data commands to sort and search your disk directories.
  551. Also, if you don't need all information in a standard directory entry
  552. (such as the date and time when the file was last written), you can
  553. start your remarks in a column that overlaps that information and thus
  554. covers it up.  If you decide you do need the date and time after all,
  555. just move the cursor back to the cell containing the directory entry,
  556. and all the original information will then appear in the first line of
  557. the control panel.
  558.  
  559. -----------------------------------------------------------------
  560.                    Word Processing with 1-2-3
  561.     (PC Magazine Vol 4 No 21 Oct 15, 1985 Spreadsheet Clinic)
  562.  
  563.      With one small macro that uses the /Range Format command, you can
  564. turn 123 into a fairly workable word processor.  First, set column
  565. width of A to 6 (or whatever you want your left margin to be).  Set the
  566. column width of B to 60 (or however many characters you want in a line
  567. of text).  Then, off out of the way, in column D or #, type the macro:
  568.           '{?}~/rj~{end}{down}/xg\W~
  569. Name this macro \W, put the cursor in column B, hit Alt-W and go.
  570.      Type text until you have finished a paragraph and hit Enter.  Your
  571. paragraph will format itself nicely inside column B.  If you type more
  572. than 240 characters, 123 will beep, and you will have to hit Enter even
  573. if you're not at the end of a paragraph.  Just hit the edit key (F2)
  574. and keep on going until you finish the paragraph.  Hit Enter again.
  575. Your paragraph will look fine.  Hit the down-arrow key once or twice to
  576. begin a new paragraph.  Warning: if you type only one line of text and
  577. hit Enter, you will suddenly find yourself at the bottom of the
  578. worksheet.  End-up-arrow will get you back.
  579.      While you are typing, you can use all of 123's Edit Mode commands.
  580. You can also back up to a paragraph you wrote earlier, hit the edit
  581. key, make changes, and hit Enter when you're finished.  Your text will
  582. even automatically realign itself to reflect the changes.
  583.      For typing address blocks, dates, titles, and so on, use the " or
  584. ^ label prefixes to right-justify or center text.  When you begin a
  585. paragraph with a number, be sure to start with ' so that 123 will know
  586. it's a label.  Also, all the normal 123 commands are still available to
  587. you.  You can Move, Copy, Erase, alphabetize, and include spreadsheet
  588. date in your text.  Just be sure to hit Ctrl-Break to get out of the
  589. macro before you use any / commands.  When you are finished with your
  590. text, print columns A and B or write a macro that prints as much of
  591. your worksheet as necessary.
  592.      Editor's Note:  This technique can do something a lot of high-
  593. priced word processors can't: multiple columns.  If you reset column
  594. B's width to 25 or 30, you'll get a nice, skinny column of text.  Use
  595. the /Move command to rearrange it on the page to your liking.  To not
  596. suddenly find yourself at row 2048 because of a one-line paragraph,
  597. put an IF statement (/xi) in the macro:
  598.  
  599. \W   {?}~/rj~/rncTEMP~{bs}.{down}~/xi@count(TEMP)>=2~{end}{down}/xg\w~
  600.      /xg\w~
  601.  
  602. With this modification it does an {end}{down} routine only when there
  603. are two or more lines in a paragraph.  You get some unwanted flash and
  604. boom each time the macro executes, but his way you'll never end up
  605. staring at a blank screen.
  606.  
  607. -----------------------------------------------------------------
  608.                        Many Happy Returns
  609.     (PC Magazine Vol 4 No 21 Oct 15, 1985 Spreadsheet Clinic)
  610.  
  611.      When you use 123 or Symphony, there is an easy way to look at any
  612. part of a large spreadsheet and then return to exactly where you were
  613. before.  The trick is to hit the + key in Ready mode to make the
  614. program think you are going to enter a formula.  You can then page
  615. around and look at whatever you like.  When you're done, just hit
  616. Escape and you'll be right back where you started.  Hit Escape again
  617. and the + sign will disappear from the command line, and leave the
  618. original cell entry unchanged.  This technique also works when you're
  619. entering a real formula; it's designed to let you look around for any
  620. cell addresses you might need to put into a formula.  To get back to
  621. the original cell, hit Escape only once.  If you hit it again, you'll
  622. wipe out your formula.
  623.  
  624. -----------------------------------------------------------------
  625.                   Getting Rid of Unwanted Zeros
  626.     (PC Magazine Vol 4 No 21 Oct 15, 1985 Spreadsheet Clinic)
  627.  
  628.      Many people use 123 to print invoices and other tabular data.
  629. The example below is a typical sample, in which the only calculations
  630. are #Units x Cost = Total, and an @sum of the Total column to give a
  631. grand total.
  632.      The usual way to set up such an invoice would be to leave out the
  633. numbers in the #Units and Cost columns, and to fill the Total column
  634. with #Units x Cost formulas, such as +B5*D5.  Until the numbers are
  635. filled in for #Units and Cost, the Total column contains a string of
  636. zeros.  Even after you have completed the invoice, you will still have
  637. zeros left in those rows for which there are no #Units or Cost figures
  638. (rows 9 through 15 below).  This makes for unprofessional invoices.
  639.      If you use the two-line macro below, you'll never have those
  640. unwanted zeros again.  Also, you need only one #Units x Cost formula
  641. (+B5*D5), in cell F5.  Just fill the #Units and Cost numbers in the
  642. invoice and run the macro with Alt-C.  The first line copies the
  643. formula in F5 to the entire Total column.  The second does a /Data
  644. Query according to the ranges described in column H and eliminates all
  645. figures in the Total column that are equal to $0.00.
  646.  
  647.   A     B    C     D      E      F       G         H
  648. --------------------------------------------------------------
  649.  4   #UNITS  |    COST    |    TOTAL     |   CRITERION RANGE
  650.  5        10 |     $25.00 |      $250.00 |   ---------------
  651.  6         5 |      $5.00 |       $25.00 |       TOTAL
  652.  7         6 |      $7.00 |       $42.00 |              $0.00
  653.  8        30 |     $15.00 |      $450.00 |
  654.  9           |            |        $0.00 |
  655. 10           |            |        $0.00 |
  656. 11           |            |        $0.00 |      RANGES
  657. 12           |            |        $0.00 |  ---------------
  658. 13           |            |        $0.00 |  TOTAL = F5..F15
  659. 14           |            |        $0.00 |  INPUT = F4..F15
  660. 15           |            |        $0.00 |  CRIT  = H6..H7
  661. 16                            ----------
  662. 17            GRAND TOTAL        $767.00
  663.  
  664.    \C   /Cf5~TOTAL~           'Copy +B5*D5 to TOTAL column
  665.         /DQIinput~Ccrit~DDQ   'Delete data records that match $0.00
  666.  
  667. -----------------------------------------------------------------
  668.                  Rows to Columns and Vice Versa
  669.     (PC Magazine Vol 4 No 21 Oct 15, 1985 Spreadsheet Clinic)
  670.  
  671.      Occasionally you may have to modify a worksheet by changing the
  672. rows into columns or the columns into rows.  There are two obvious
  673. ways to do this: 1) move or copy each cell to a new location one cell
  674. at a time, or 2) with cells containing values, write formulas to
  675. reproduce the values in different cells.  Neither way is efficient.
  676.      Make a copy of your worksheet and put the original away.  Start
  677. 123 by typing LOTUS and choose Translate from the Access System menu.
  678. Translate your worksheet from WKS to DIF and then translate it back
  679. from DIF to WKS.  When you make this second translation, you will get
  680. a prompt asking whether you want the translation by columns or by rows.
  681. Choose row-wise translation, and your original columns will become rows
  682. and your rows will become columns.
  683.      If you extract a section of the worksheet to translate and the
  684. program hangs up, it probably means you have partial range name
  685. definitions within the extract.  Strip all range names from the extract
  686. with the /Range Name Reset command, save the file, and try the
  687. translation again.  Translation removes range names and cell formats
  688. anyway, so you might as well do it yourself to avoid problems.
  689.      Editor's Note:  The procedure does more than remove range names
  690. and cell formats; it also turns all formulas into values.  Further, it
  691. produces a weird sort of mirror image of the original rows and columns.
  692. For example, a column that started in cell B4 (2 across and 4 down)
  693. will turn into a row that begins at D2 (4 across and 2 down).  Still,
  694. if all you need is to move values and labels around, it beats any other
  695. method.
  696.  
  697. -----------------------------------------------------------------
  698.                         Two More on 1-2-3
  699.               (PC World October 1985 Star-Dot-Star)
  700.  
  701.      When writing macros, users are accustomed to pressing the ESCape
  702. key to back out of a menu.  However, when ESCape is pressed within a
  703. macro, 123 goes to whatever follows the /XM statement, causing the
  704. macro to overwrite a cell with the macro menu labels.  This can be a
  705. serious problem if the cursor was over an important cell.  To avoid
  706. this situation, leave a blank line between the cell containing the
  707. /XM statement and the first menu item.
  708.      Using the @SUM function is much more efficient for the use of long
  709. addition formulas such as +A1+B5+C8+F9+H17+I15+P46+Q55+AA15+AB15.  For
  710. example, the formula @SUM(A1,B5,C8,F9,H17,I15,P46,Q55,AA15,AB15) uses
  711. less memory as well as less disk space than it does when entered as a
  712. string of addition.
  713.  
  714. -----------------------------------------------------------------
  715.                        Entering Zip Codes
  716.   (PC Magazine Vol 4 No 22 October 29, 1985 Spreadsheet Clinic)
  717.  
  718.      Entering zip codes can be a problem in 123, especially when they
  719. begin with 0.  123 doesn't allow a numeric entry to being with a 0 and
  720. strips it from the front of the number.  This macro makes things easy:
  721.           \Z     '{?}~{down}/xg\Z~
  722. The macro automatically assigns a label prefix to your cell entry,
  723. waits for the entry, moves to the next cell and then repeats itself.
  724. This way zip coes can begin with 0.  You get out of the endless loop
  725. with Ctrl-Break.
  726.      Editor's Note:  Zip codes become labels instead of numbers in this
  727. case, but that should make no difference.  You can still use the /Data
  728. Sort command to sort them, and no one does airthmetic on zip codes.
  729. This macro is handy for more than zip codes.  You can use it any time
  730. you want to enter numbers or math symbols as labels.  It would be
  731. useful for writing macros, for example, where it's easy to forget that
  732. you have to precede every / at the beginning of a line with a label
  733. prefix.  You can modify this macro for row work by replacing {down}
  734. with {right}.  Finally, you might find it useful to replace the initial
  735. ' with ^ or " if you want to center or right-justify your labels.
  736.  
  737. -----------------------------------------------------------------
  738.              Inserting Blank Lines in a Spreadsheet
  739.     (PC Magazine Vol 4 No 23 Nov 12, 1985 Spreadsheet Clinic)
  740.  
  741.      Sometimes you have to insert blank lines between the existing
  742. lines of a spreadsheet.  It's easy enough to write a macro to insert
  743. them, but if there are many blank lines to insert, the macro will take
  744. a long time to execute.  Also, when you use the Insert command, it will
  745. put new rows into the entire spreadsheet, whereas you may want more
  746. space in just one (vertical) part of the worksheet and may prefer to
  747. leave the rest of it unchanged.  The figure below illustrates this
  748. technique.  Assume that you want to insert blank spaces between the
  749. spreadsheet data in column D of the "Before" illustration; when you're
  750. finished, the data should look like the "After" illustration.  The
  751. first step is to move any data in rows 10 through 16 of column D out
  752. of the way to make as many blank rows as you have rows of spreadsheet
  753. data.  Next, use the /Data Fill command to enter a number series in
  754. cells C2 to C9.  Start with 1 but choose an increment of 2, so that
  755. you get the odd number series 1 to 13.  Then go End-Down to get to the
  756. bottom of the sequence, and use /Copy. End-Up Down Return to make an
  757. exact copy of the odd number series in cells C10 to C16.  This is an
  758. intermediate step.
  759.      Now move to C10, the first cell of the sequence just copied, and
  760. do another /Data Fill.  Hit the backspace when 123 offers the previous
  761. data fill range and then go End-Down Return.  It was the previous copy
  762. step that let's you specify the fill range with End-Down.  It's
  763. important that the two number sequences be the same length, and this
  764. is the easiest way to be sure that they are.  123 now proposes a data
  765. fill starting value of 1, but enter 2 and hit Return twice.  The new
  766. sequence in cells C10 through C16 is all even numbers, and the screen
  767. looks exactly like the "Before" illustration.
  768.      Now all you need to do is sort columns C and D with column C as
  769. the primary sort key.  The odd and even numbers in column C fall into
  770. sequence and, in addition, the data is double-spaced, as shown in the
  771. "After" illustration.  And you haven't inserted a single new row into
  772. the spreadsheet; only the part you sorted has changed.  Thus, if you
  773. had data in columns E and beyond, it would remain untouched.
  774.      If you need to insert two blank lines between each row of data,
  775. use the same technique but make three data fill sequences, using step
  776. 3 instead of step 2.  Start the first sequence with 1, the second with
  777. 2, and the last sequence with 3.
  778.  
  779. === BEFORE ===                         === AFTER ===
  780.  
  781.          C        D                             C         D
  782.  3       1     Sample data              3       1     Sample data
  783.  4       3     Sample data              4       2
  784.  5       5     Sample data              5       3     Sample data
  785.  6       7     Sample data              6       4
  786.  7       9     Sample data              7       5     Sample data
  787.  8      11     Sample data              8       6
  788.  9      13     Sample data              9       7     Sample data
  789. 10       2                             10       8
  790. 11       4                             11       9     Sample data
  791. 12       6                             12      10
  792. 13       8                             13      11     Sample data
  793. 14      10                             14      12
  794. 15      12                             15      13     Sample data
  795. 16      14                             16      14
  796.  
  797. -----------------------------------------------------------------
  798.                   Preventing Escape from a Menu
  799.     (PC Magazine Vol 4 No 24 Nov 26, 1985 Spreadsheet Clinic)
  800.  
  801.      With normal 123 menus it's possible to hit the Escape key to back
  802. up through menu choices and eventually to return to the ready mode.
  803. When you write your own menu macros, however, the Escape key will not
  804. necessarily get you back to ready mode.  Instead, it causes the macro
  805. to skip the menu and continue on with the commands in the cell below
  806. the /XM command.
  807.      You may not, however, want users to be able to avoid a menu choice
  808. by hitting the Escape key, as illustrated below.  The names in column E
  809. are range names for the cells to their right.  (Cell F14 has both a
  810. macro name -- \A to start the menus -- and a range name.)  The trick to
  811. keeping the user within the menus is to put a /XG (goto) command just
  812. below the cells that invoke menus.  In this case, cells F14 and F17
  813. contain the /XM commands that invoke the main menu and the print menu
  814. (F4..H7 and F9..H12).  If the user hits Escape after either menu
  815. appears, the gotos in F15 and F18 will send him right back to F14,
  816. which invokes the main menu.
  817.      The /XG commands at the ends of the menu options (cells F7, G7,
  818. F12, G12, H11) send the user back to the main menu after the macro has
  819. saved the file or printed the report.  Thus, the only way out of the
  820. menus -- aside from hitting Ctrl-Break -- is to exit via the last
  821. choice in the main menu.
  822.  
  823.        E             F                 G              H
  824.  4   MAIN      Print              Save            End
  825.  5             Print the report   Save the file   End program
  826.  6             /xgToPrint~        /fsFILENAME~    /wey
  827.  7             /xgToMAIN~         /xgToMAIN~
  828.  8
  829.  9   Print     Align              Page            Quit
  830. 10             Align page         Page up         Quit Print
  831. 11             /ppagq             /pppgq          /xgToMAIN~
  832. 12             /xgToMAIN~         /xgToMAIN~
  833. 13
  834. 14   ToMAIN    /xmMAIN~
  835. 15   & \A      /xgToMAIN~
  836. 16
  837. 17   ToPrint   /xmPrint~
  838. 18             /xgToMAIN~
  839.  
  840. -----------------------------------------------------------------
  841.              Adding Sound Effects to 1-2-3 Messages
  842.     (PC Magazine Vol 4 No 24 Nov 26, 1985 Spreadsheet Clinic)
  843.  
  844.      The /XL and /XN commands in the 123 macro language display a
  845. message and wait for keyboard input.  They are normally used in
  846. interactive 123 models to request information from the user.  But you
  847. can also use them for error messages.
  848.      You can even make the computer beep in conjunction with an /XL
  849. or /XN message simply by writing a message that is longer thatn 123's
  850. 39-character limit.  The macro below shows two uses of the /XN command,
  851. the first as a prompt for input, the second as both a prompt for input
  852. and an error message.
  853.      In the first /XN command, the prompt message is less than 39
  854. characters long, so the computer will not beep.  In the second /XN
  855. command, which operates only if the user makes an error, the spaces
  856. between "Try Again" and the tilde that follows stretch the message past
  857. the 39-character limit.  The computer will beep once for each space
  858. past 39 characters, but since the spaces follow each other immediately,
  859. they have the effect of producing one long beep.  This trick signals
  860. errors and will not interfere with the operation of the macro in any
  861. way.
  862.      Editor's Note:  When you use /XN or /XL strictly as an error
  863. message, 123 still waits for user input.  Since /XL will accept any
  864. kind of input, but /XN requires numbers, it's best to use /XL.  In
  865. either case, you still have to include a cell address where the user
  866. input will be stored.  The input usually doesn't matter, so you can
  867. tuck it out of the way in a corner of the worksheet and ignore it.
  868.  
  869. -----------------------------------------------------------------
  870.                          Total Solution
  871.              (PC World November 1985 Star-Dot-Star)
  872.  
  873.      Often a row and a column of a worksheet should yield equal totals.
  874. 123 offers no easy way to check this, since the spreadsheet can place
  875. only one value in a cell, either the sum of the row or the sum of the
  876. column.  The formula below compares two totals from a hypothetical
  877. worksheet.  If they match, the program displays the total; if the
  878. values differ, you'll see "ERR".
  879.  
  880.           @if(@sum(g5..g16)=@sum(B17..F17),@SUM(G5..G16),@ERR)
  881.  
  882. Change the cell references to match those of the row and column you
  883. wish to compare.
  884.  
  885. -----------------------------------------------------------------
  886.                        On Menus and Memory
  887.     (PC Magazine Vol 4 No 25 Dec 10, 1985 Spreadsheet Clinic)
  888.  
  889.      If you write 123 menus with the /XM command, you will find that
  890. many people back out of them by hitting Escape.  That works fine with
  891. 123's own menus, but not always with the ones you build yourself.  When
  892. 123 is processing a macro-written menu, hitting Escape just makes the
  893. macro processor move on to the next cell in the macro.  The sample menu
  894. macros below will run differently even though the blank space in cell
  895. D14 is the only difference between them.  If you run the first macro
  896. and then hit Escape to get out of the menu, the macro processor will
  897. go on and read cells Dy, D7 and D8, even though they are text for the
  898. menu rathen than macro commands.  Because of the carriage return in
  899. cell D8, the macro will write that text into whatever cell the cursor
  900. happens to be on.  If that cell had something important it it, it would
  901. be gone.  If you run the second macro and hit Escape to get out, you'll
  902. return smoothly to the ready state.  This is because the macro
  903. processor finds a blank cell at D14 and terminates the macro.
  904.  
  905.                D                      E                    F
  906.  3
  907.  4                           ** First Menu **
  908.  5  /xmD6~
  909.  6  Income                   Balance               Quit
  910.  7  Print income statement   Print balance sheet   Return to ready mode
  911.  8  /ppcrrINCOME~q           /ppcrrBALANCE~q
  912.  9
  913. 10
  914. 11
  915. 12                           ** Second Menu **
  916. 13  /xmD15~
  917. 14
  918. 15  Income                   Balance               Quit
  919. 16  Print income statement   Print balance sheet   Return to ready mode
  920. 17  /ppcrrINCOME~q           /ppcrrBALANCE~q
  921.  
  922.      The two different formulas below do the same thing; however, you
  923. will use less memory and disk space if you use the formula with the
  924. @sum function.  This is because 123 knows that the operator is + for
  925. every cell in the second formula, whereas it must ust memory and disk
  926. space to record each separate operator in the first formula.
  927.  
  928.      +A1+B5+C8+F9+H17+I15+P46+Q55+AA15+AB28+BG67+BA15+CB45+N47+I16
  929.  
  930.      @sum(A1,B5,C8,F9,H17,I15,P46,Q55,AA15,AB28,BG67,BA15,CB45,N47,I16)
  931.  
  932.      Editor's Note:  The 123 manual clearly explains that hitting
  933. Escape when in a macro-built menu will make the macro keep executing
  934. from the cell below the /XM command.  Since the /XM command includes
  935. the address of the cell where the menu text begins, the text doesn't
  936. have to be right under the /XM command and thus directly in the path
  937. of the macro.  A common solution is to keep menu texts in a column
  938. away from the macro.  This allows you to include macro commands below
  939. the /XM command that will continue to execute if the user refuses to
  940. make a menu choice and hits Escape instead.  The above solution works
  941. well, however, and it has the advantage of keeping the menu text close
  942. to the /XM command.  This is handy when you're debugging or modifying
  943. a macro.
  944.      A large spreadsheet which included the two different formulas was
  945. used to test the second tip.  The @sum formula took up 98 bytes of
  946. memory, whereas the + formula took up 110 bytes, which constituted a
  947. savings of 12 bytes.  Both formulas, however, increased the
  948. spreadsheet's disk space by exactly the same amount -- 128 bytes.
  949.  
  950. -----------------------------------------------------------------
  951.                          Utility Macros
  952.     (PC Magazine Vol 4 No 26 Dec 10, 1985 Spreadsheet Clinic)
  953.  
  954.      It's very common to write a formula, such as A12/B16, in which the
  955. values in the formula depend on other cells.  Occasionally one of those
  956. cells may have the value zero.  If the formula calls for multiplication
  957. by zero, there's no problem, but if B16 turned out to be zero, the
  958. formula would now call for division by zero and you'd get an ugly "ERR"
  959. message.  The macro:
  960.  
  961.           \E   {edit}{home}@if(CELLX=0,0,{end})~
  962.  
  963. is a cosmetic device to get rid of that message and display a zero
  964. instead.  Just replace CELLX with the range name or address of the
  965. value that might be zero.  The macro tests CALLX to see if it's zero
  966. and if it's not, it leaves your formula alone.  To use the macro, move
  967. the cursor to the cell with the formula in it and hit Alt-E.
  968.      This macro speeds up the @SUM function when you want to total a
  969. column of numbers:
  970.  
  971.           \S   @sum({end}{up}.{end}{up})~
  972.  
  973. Just move the cursor to a cell two rows below the column to be totaled
  974. and hit Alt-S.  If you want the total put immediately below your column
  975. of numbers, remove the first {end} from the macro and run it with the
  976. cursor in the cell just below the column.  Note that other @functions,
  977. like @MIN, @STD, @VAR, @AVG, and so on will work in the same macro.
  978.      This macro converts a decimal number into a percent:
  979.  
  980.           \P   {edit}{home}({end})*100~/rff2~~
  981.  
  982. While you can do the same thing with 123's own percent format, you
  983. always get the % sign shown along with your number.  The macro is handy
  984. if you have a column in a spreadsheet that is title "Percentage," and
  985. you don't want a % sign in every cell.  Using the macro, all you have
  986. to do is move to the cell you want to edit and hit Alt-P.
  987.  
  988. -----------------------------------------------------------------
  989.                 Naming and Storing Macro Routines
  990.     (PC Magazine Vol 4 No 26 Dec 10, 1985 Spreadsheet Clinic)
  991.  
  992.      Whenever you write a complex 123 macro, split it into separate
  993. routines, each with a name that describes its function.  You can then
  994. call these routines from a single "main-line" macro, similar to the
  995. subroutine calls of structured programs.  After the subroutine runs,
  996. it hands control back to the main program.  It is helpful to give a
  997. range name to the entire subroutine macro, not just to the first cell.
  998. The operation of the macro is unchanged because a GOTO command always
  999. takes you to the first cell anyway.  But now you can use /Worksheet
  1000. Move to move the macro around within the worksheet.  Even better, you
  1001. can make a library of subroutines, saving them together in one
  1002. spreadsheet under descriptive names.  Whenever you need a subroutine
  1003. in your current spreadsheet, read it in from disk with /File Copy
  1004. Combine Name.
  1005.  
  1006. -----------------------------------------------------------------
  1007.